package com.ming.feign.hystrix;

import com.alibaba.fastjson.JSON;
import com.ming.domain.Sku;
import com.ming.feign.OrderProductFeign;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Author:何元才
 * @Desc:
 * @data:2021-04-09 15:23
 */
@Component
@Slf4j
public class OrderProductFeignHystrix implements OrderProductFeign {
    /**
     * 远程调用根据skuIds查询sku集合
     *
     * @param skuIds
     * @return
     */
    @Override
    public List<Sku> getSkuListByIds(List<Long> skuIds) {
        log.error("远程调用根据skuIds查询sku集合失败，skuIds为{}", JSON.toJSONString(skuIds));
        return null;
    }

    /**
     * 远程调用修改库存
     *
     * @param map
     */
    @Override
    public void changeStock(HashMap<String, Map<Long, Integer>> map) {
        log.error("远程调用修改库存失败，map{}", JSON.toJSONString(map));

    }
}